﻿using Sino.Tms.Primitives;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace Sino.CapacityCloud.Repositories.Models
{

    public class Carrier
    {

        [Key()]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public string CarrierId { get; set; }

        public string Name { get; set; }

        public CarriageType Type { get; set; }

        public virtual ICollection<Car> Cars { get; set; }

        public virtual ICollection<ApplicationUser> Users { get; set; }

        public Carrier()
        {
            this.CarrierId = Guid.NewGuid().ToString();
            this.Cars = new List<Car>();
            this.Users = new List<ApplicationUser>();
        }

    }

}